package com.hb.trade.client.project;

import com.hb.core.pojo.Attachments;
import com.hb.core.pojo.project.archive.dto.ArchiveCommonFileDTO;
import com.hb.core.pojo.project.archive.dto.ProjectArchiveFileDTO;
import com.hb.core.pojo.project.archive.entity.ProjectArchiveFile;
import org.fzzn.core.model.msg.Message;
import org.fzzn.core.model.msg.ResponseDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * describe:
 * 归档相关
 *
 * @author zhongdl
 * @date 2022/2/14
 */
@FeignClient("hb-project")
public interface ProjectArchiveFileClient {


    /**
     * 查询文件
     *
     * @param projectArchiveFileDTO
     * @return
     */
    @PostMapping("/archive/file/info")
    public Message<Object> info(@RequestBody ProjectArchiveFileDTO projectArchiveFileDTO);

    /**
     * 查询文件
     *
     * @param projectArchiveFileDTO
     * @return
     */
    @PostMapping("/archive/file/section")
    public Message<Attachments> getAttachments (@RequestBody ProjectArchiveFileDTO projectArchiveFileDTO);

    /**
     * 添加文件类型
     *
     * @Param: projectArchiveFileVO
     * @return: Message<Boolean>
     * @Author: 岳争
     * @Date: 2022/2/17
     */
    @PostMapping("/archive/type/add")
    public Message<Boolean> addArchiveType(@RequestBody ProjectArchiveFile projectArchiveFile);

    /**
     * 添加文件
     *
     * @param projectArchiveFile
     * @return
     */
    @PostMapping("/archive/file/add")
    public Message<Boolean> addArchiveFile(@RequestBody ProjectArchiveFile projectArchiveFile);

    /**
     * 删除文件类型
     *
     * @Param: projectArchiveFileVO
     * @return: ResponseDto
     * @Author: 岳争
     * @Date: 2022/2/17
     */
    @PostMapping("/archive/file/delById")
    Message<Boolean> deleteArchiveFile(@RequestBody ProjectArchiveFileDTO projectArchiveFileDTO);

    /**
     * 删除单个文件
     *
     * @Param: projectArchiveDetailDTO
     * @return: ResponseDto
     * @Author: 岳争
     * @Date: 2022/2/17
     */
    @PostMapping("/archive/file/del")
    Message<Boolean> deleteByFileid(@RequestBody ProjectArchiveFileDTO projectArchiveDetailDTO);
}
